﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace MethodWorx.CMS.TemplateLanguage.Parsers
{
    public class RequestParser : IParser
    {
        public object Parse(Web.CmsRequestContext context, IEnumerable<object> stack, Dictionary<string, object> parameters)
        {
            return HttpContext.Current.Request[parameters["name"].ToString()];
        }

        public string Name
        {
            get { return "Request"; }
        }

        public string Namespace
        {
            get { return "Http"; }
        }

        public string[] Parameters
        {
            get { return new string [] { "Name" }; }
        }
    }
}
